package com.aizuda.boot.modules.business.contract.entity.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@Schema(description = "合同创建/更新请求")
public class ContractUpdateReqDTO {

    @Schema(description = "是否提交审批，传true表示提交审批，不传或false表示仅保存修改", example = "false")
    private Boolean isSubmit;

    @Valid
    @Schema(description = "基础信息", required = true)
    private ContractBasicInfo basicInfo;

    @Schema(description = "合同表单数据（JSON字符串）")
    private String content;

    @Data
    @Accessors(chain = true)
    @Schema(description = "合同基础信息")
    public static class ContractBasicInfo {
        @Schema(description = "合同ID", example = "1")
        private Integer id;

        @Schema(description = "合同流程ID", required = true, example = "1")
        private Long processId;

        @Schema(description = "合同主合同文件ID")
        private Integer mainContractFileId;
    }

}